//
//  WJPerson.h
//  JerryIos
//
//  Created by jerrywang on 2018/2/4.
//  Copyright © 2018年 王军. All rights reserved.
//

#import <Foundation/Foundation.h>

//名称的字体
#define WJNameFont [UIFont systemFontOfSize:14]
//正文的字体
#define WJTextFont [UIFont systemFontOfSize:15]

@interface WJPerson : NSObject

@property (nonatomic, copy) NSString *icon;   //图标
@property (nonatomic, copy) NSString *name;   //名称
@property (nonatomic, copy) NSString *text;   //内容
@property (nonatomic, copy) NSString *pic;    //图片
@property (nonatomic, assign) BOOL vip;       //vip

//用来存放cell内部所有子控件的frame数据 和 cell高度
@property (nonatomic, assign, readonly) CGRect iconFrame;  //头像的frame
@property (nonatomic, assign, readonly) CGRect nameFrame;  //名称的frame
@property (nonatomic, assign, readonly) CGRect vipFrame;   //vip的frame
@property (nonatomic, assign, readonly) CGRect textFrame;  //正文的frame
@property (nonatomic, assign, readonly) CGRect picFrame;   //图片的frame
@property (nonatomic, assign, readonly) CGFloat cellHeight;  //cell高度

+(instancetype) personWithDict:(NSDictionary *)dict;
-(instancetype) initWithDict:(NSDictionary *)dict;

-(void) calculateFrame;

@end
